home *** CD-ROM | disk | FTP | other *** search
- Path: mserv.wizvax.net!news
- From: tonyp@wizvax.wizvax.net (Tony Postmayer)
- Newsgroups: comp.sys.cbm
- Subject: Re: programming question:block-X commands
- Date: Sat, 13 Apr 1996 00:22:23 GMT
- Organization: Wizvax Communications, Troy, N.Y. 12180 USA
- Message-ID: <316ef311.308129@199.181.141.3>
- References: <4k3joe$5st@news.xmission.com>
- NNTP-Posting-Host: tonyp.wizvax.net
- X-Newsreader: Forte Agent .99d/32.182
-
- On 5 Apr 1996 17:03:10 GMT, jshell@xmission.com (riverYard) wrote:
-
- >i asked this earlier but i lost the answer, and it didn't help much
-
- Not the best tone to set if you expect help.
-
- >anyhooz. i was told that to use the U1 and U2 drive commands through
- >assembly, you had to send the whole thing as a big block of text, i.e.:
- >.byte "U1: 2 0 18 1" for channel, drive, track, block respectively. i
- >don't have a number-to-text routing written yet and i don't want to deal
- >with it right now. can i send
- >.byte "U1:",2,0,18,1 instead? last time i tried this and it didn't work,
- >but i was using B-R instead.
- >
- Like I told you before, the commands must be sent as TEXT.
-
- See if you can manage to utilize this:
-
- ;===========================
- ;== convert 16 bit number ==
- ;== to ascii text ==
- ;== enter with number x/a ==
- ;===========================
- baws *=*+3 ;workspace
- ;
- bin2asc =*
- sta baws+1 ;high byte
- stx baws+2 ;low byte
- lda #0
- pha ;flag
- bin2asc0 =*
- ldx #16
- lda #0
- clc
- bin2asc1 =*
- sta baws
- bin2asc2 =*
- rol baws+2
- rol baws+1
- rol baws
- dex
- bmi bin2asc3
- lda baws
- cmp #10 ;remainder >9
- bcc bin2asc2
- sbc #10
- bcs bin2asc1
- bin2asc3 =*
- ora #$30
- pha
- lda baws+2
- ora baws+1
- bne bin2asc0
- bin2asc4 =*
- pla
- beq bin2asc5
- jsr $ffd2
- bne bin2asc4
- bin2asc5 =*
- rts
-
-